using System.Collections;
using Rdl;

namespace GTame.ReportParser
{

    public class CategoryGroupingType
    {

        private GTame.ReportParser.DynamicCategoriesType _DynamicCategories;
        private GTame.ReportParser.StaticCategoriesType _StaticCategories;

        public GTame.ReportParser.DynamicCategoriesType DynamicCategories
        {
            get
            {
                if (_DynamicCategories == null)
                    _DynamicCategories = new GTame.ReportParser.DynamicCategoriesType();
                return _DynamicCategories;
            }
            set
            {
                _DynamicCategories = value;
            }
        }

        public GTame.ReportParser.StaticCategoriesType StaticCategories
        {
            get
            {
                if (_StaticCategories == null)
                    _StaticCategories = new GTame.ReportParser.StaticCategoriesType();
                return _StaticCategories;
            }
            set
            {
                _StaticCategories = value;
            }
        }

        public CategoryGroupingType()
        {
        }

        public Rdl.CategoryGroupingType Write()
        {
            Rdl.CategoryGroupingType categoryGroupingType = new Rdl.CategoryGroupingType();
            System.Collections.ArrayList arrayList = new System.Collections.ArrayList();
            if (_DynamicCategories != null)
                arrayList.Add(_DynamicCategories.Write());
            if (_StaticCategories != null)
                arrayList.Add(_StaticCategories.Write());
            categoryGroupingType.Items = arrayList.ToArray();
            arrayList = null;
            return categoryGroupingType;
        }

    } // class CategoryGroupingType

}

